package cn.shyouchi.wuguanjia.android.ui.meetting.plan;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.shyouchi.wuguanjia.android.Global;
import cn.shyouchi.wuguanjia.android.R;
import cn.shyouchi.wuguanjia.android.ui.meetting.common.MeetPerson;
import cn.shyouchi.wuguanjia.android.widget.GlideCircleTransform;

/**
 * Created by Eenie on 2017/2/16 at 16:05
 * Email: 472279981@qq.com
 * Des:
 */

public class MeetSignPersonAdapter extends BaseQuickAdapter<MeetPerson,BaseViewHolder> {
    public MeetSignPersonAdapter(List<MeetPerson> data) {
        super(R.layout.item_meet_sign_person_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, MeetPerson person) {
        holder.setText(R.id.tv_person_name, person.getName());
        loadHead(Global.BASE_URL + person.getId_card_head_image(), (ImageView) holder.getView(R.id.img_header));
    }


    private void loadHead(String path, ImageView imageView) {
        Glide.with(mContext)
                .load(path)
                .transform(new GlideCircleTransform(mContext))
                .into(imageView);
    }
}
